import Vue from 'vue'
// import VueRouter from 'vue-router'
import VueRouter from '../../myHistoryRouter'
// import VueRouter from '../../myHashRouter'
import Home from '../views/Home.vue'
import About from '../views/About.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // props: true,
    // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    component: About
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import(/* webpackChunkName: "404" */ '../views/detail.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
